﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="NewsMain.ascx.cs" Inherits="Controls_NewsMain" %>



<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
    <HeaderTemplate>
        <div class="row">
            <div class="col-md-12 col-xs-12 col-sm-12">
                <div class="panel">
                    <div class="panel-heading panel-icon2">
                        <h2 class="panel-title">Tin Tức</h2>
                    </div>
    </HeaderTemplate>
    <ItemTemplate>
        <div class="media media-boder">
            <asp:HyperLink ID="HyperLink2" runat="server" CssClass="pull-left" NavigateUrl='<%# Eval("Mabaiviet", "../ChiTietTinTuc.aspx?ma={0}") %>'>
                <asp:Image ID="Image1" runat="server" Height="50px"
                    ImageUrl='<%# "~/"+Eval("Hinhanh") %>' CssClass="media-object news-img"
                    ToolTip='<%# Eval("Tieude") %>' />
            </asp:HyperLink>
            <div class="media-body">
                <a href="#" class="news-title">
                                <asp:HyperLink ID="HyperLink3" runat="server" Text='<%#Eval("Tieude")%>'  CssClass="link-black" NavigateUrl='<%# Eval("Mabaiviet", "../ChiTietTinTuc.aspx?ma={0}") %>'>
            </asp:HyperLink>
                </a>
                <p class="news-time">
                    <asp:Label ID="Label2" runat="server" Text='<%#Eval("NgayTao")%>'></asp:Label></p>
            </div>
        </div>
    </ItemTemplate>
    <FooterTemplate>
        <div class="view-all pull-right" style="padding-bottom:10px;border-bottom: 1px solid #dedede;">
            <asp:HyperLink ID="HyperLink1" ToolTip="Xem tất cả tin tức" runat="server" CssClass="text-blue" NavigateUrl="~/TinTuc.aspx">Xem tất cả tin tức<span style="font-size: 15px">»</span> </asp:HyperLink>
        </div>
        </div>
    </div>
</div>
    </FooterTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
    ConnectionString="<%$ ConnectionStrings:QLBSConnectionString %>"
    SelectCommand="SELECT top 4 * FROM [Baiviet] order by NgayTao desc "></asp:SqlDataSource>
